package com.arpa.oms.domain.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

import java.util.HashMap;
import java.util.Map;

public enum KuaishouCarrierEnum implements IEnum<String> {
    /**
     * 是否按全部商品拆分   快手快递链接  https://open.kwaixiaodian.com/docs/dev?pageSign=3d4aa40abaab83c4a5f5839f6848dcb71614264033704
     */
    BAI_SHI_KUAI_DI("百世快递", "1"),
    SHEN_TONG_KUAI_DI("申通快递", "3"),
    SHUN_FENG_SU_YUN("顺丰速运", "4"),
    TIAN_TIAN_KUAI_DI("天天快递", "5"),
    YUAN_TONG_SU_DI("圆通速递", "6"),
    YUN_DA_KUAI_YUN("韵达快运", "7"),
    YOU_ZHENG_KUAI_DI("邮政快递包裹", "8"),
    ZHONG_TONG_KUAI_DI("中通快递", "9"),
    ZHIA_JI_SONG("宅急送", "10"),
    YUN_DA_KUAI_DI("韵达快递", "11"),
    ZHONG_TONG_KUAI_YUN("中通快运", "12"),
    YUAN_TONG_KUAI_YUN("圆通快运", "13"),
    JING_DONG("京东", "14"),
    YOU_SU_WU_LIU("优速物流", "15"),
    DE_BANG("德邦", "17");


    /**
     * 值
     */
    private final String value;

    /**
     * 描述
     */
    private final String desc;

    KuaishouCarrierEnum(final String value, final String desc) {
        this.value = value;
        this.desc = desc;
    }

    private static final Map<String, KuaishouCarrierEnum> map = new HashMap();

    static {
        KuaishouCarrierEnum[] values = values();
        int length = values.length;
        for(int i = 0; i < length; i++){
            KuaishouCarrierEnum value1 = values[i];
            map.put(value1.getValue(),value1);
        }
    }

    public static KuaishouCarrierEnum getEnumByValue(String value){

        return map.get(value);
    }
    @Override
    public String getValue() {
        return this.value;
    }

    @Override
    public String toString(){
        return this.desc;
    }

    public String getDesc() {
        return this.desc;
    }
}
